﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;

namespace NerdDinnerReloaded.Models
{
    public class NerdDinnersDB : DbContext
    {
        public NerdDinnersDB() : base("NerdDinnersDB") { }

        public DbSet<Dinner> Dinners { get; set; }
        public DbSet<RSVP> RSVPs { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new DinnerConfiguration());
            modelBuilder.Configurations.Add(new RSVPConfiguration());
        }
    }
}